<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="renderer" content="webkit|ie-comp|ie-stand" />
		<meta name="wiewport" content="width=device-width, initial-scale=1.0, maxinum-scale=1.0, user-scaleable=no" />
        <title>企业需求审核-管理后台</title>
        <link rel="stylesheet" href="/css/bootstrap-datetimepicker.css">
        <script type="text/javascript" src="/js/userCommon.js"></script>
        <script type="text/javascript" src="/js/bootstrap-datetimepicker.js"></script>
        <script type="text/javascript" src="/js/bootstrap-datetimepicker.zh-CN.js"></script>
        <script type="text/javascript" src="/js/bootstrap-suggest.min.js"></script>
	</head>

	<body class="main_body">
		<!--头部nav-->
		<div class="navbar navbar-default">
			<div class="container">
				<ul class="nav text-center quick_enter">
					<li><img src="/img/logo_login_03.jpg" class="nav_img" /></li>
					<li class="quick_enterli m-l-md">
						<a href="/entry.html">首页 </a>
					</li>
					<li class="quick_enterli">
						<a href="/theme.html" class="">强链接企业</a>
					</li>
					<li class="quick_enterli">
						<a href="/partner.html" class="">战略合作伙伴</a>
					</li>
					<li class="quick_enterli">
						<a href="/data.html" class="">数据看板</a>
					</li>
					<li class="dropdown pull-right admin_info">
						<img src="/img/shejishi_07.jpg" class="img-photo" />
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
							<span id="user_span"></span> <span class="drop_caret"></span>
						</a>
						<ul class="dropdown-menu">
							<li>
								<a href="/usercenter/myAttention.html" ><i class="fa fa-user-secret"></i> 个人中心</a>
							</li>
							<li class="hidden" id="backPageEnter1">
								<a href="javascript:void(0)" ><i class="fa fa-server"></i> 后台管理</a>
							</li>
							<li>
								<a href="javascript:void(0)" id="logout_a"><i class="fa fa-sign-out"></i> 退出登录</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<!--主体-->
		<div class="container containerbox">
			<!--左边导航-->
			<div class="left_side">
				<div class="ibox">
                    <h3 class="topTitle">账号管理</h3>
					<ul class="leftMeun">
                        <li>
							<a href="/admin/accountList.html"><i class="fa fa-weixin" aria-hidden="true"></i>账号列表</a>
						</li>
						<li>
							<a href="/admin/addAccount.html"><i class="fa fa-unlink" aria-hidden="true"></i>新增账号</a>
						</li>
					</ul>
					<h3 class="topTitle">审核管理</h3>
					<ul class="leftMeun">
                        <li>
							<a href="/admin/businessContactsExamine.html"><i class="fa fa-weixin" aria-hidden="true"></i>联系人审核</a>
                        </li>
                        <li>
							<a href="/admin/businessInteractionExamine.html"><i class="fa fa-weixin" aria-hidden="true"></i>链接互动审核</a>
                        </li>
                        <li class="active">
							<a href="/admin/businessNeedExamine.html"><i class="fa fa-weixin" aria-hidden="true"></i>企业需求审核</a>
                        </li>
                        <li class="">
							<a href="/admin/businessList.html"><i class="fa fa-weixin" aria-hidden="true"></i>企业审核</a>
                        </li>
                        <li class="">
							<a href="/admin/partnerList.html"><i class="fa fa-weixin" aria-hidden="true"></i>合作伙伴审核</a>
						</li>
					</ul>
				</div>

			</div>
			<!--右边-->
			<div class="right_side">
				<div class="ibox">
					<div class="ibox-content" >
						<div class="comform-inline">
                            <label>企业名称：</label>
                            <input type="text" style="width: 150px;"  id="sentName" placeholder="请输入企业名称">
							<label>状态：</label>
							<select id="dataType" style="width: 100px;">
								<option value="0" selected>全部</option>
								<option value="-1">未审核</option>
								<option value="1">已审核</option>
							</select>
                            <button type="button" id="searchBtn" class="btn">查询</button>
                            <button type="button" id="importBtn" class="btn" style="float:right;">EXCEL导入</button>
                            <!-- <button type="button" id="do-add" class="btn" style="float:right;margin-right: 10px;">增加</button> -->
						</div>
						<table class="table_at">
							<tr class="ac_title">
								<th style="width: 5%;">序号</th>
								<th style="width: 30%;">企业名称</th>
								<th style="width: 35%;">需求描述</th>
								<th style="width: 10%;">状态</th>
								<th style="width: 20%;">操作</th>
							</tr>
							<tbody id="list">
			
							</tbody>
						</table>
						<!--分页-->
						<div class="pagination-box">
							<ul class="pagination">
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--footer-->
		<div class="footer" id="footerA"> </div>
		<!-- 查看/审核/删除模态框（Modal） -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title" id="myModalLabel">需求详情</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal" role="form">
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">企业名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="entName">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">主题</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="topic">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">地址</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="addr">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">描述</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" rows="3" readonly id="description"></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">对接日期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="meetDate">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">联系人</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="contact">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">职位</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="position">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">联系方式</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="mobile">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">创建日期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="createdate">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">审核日期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="updatedate">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">审核状态</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="labelVerify">
                                </div>
                            </div>
                            <div class="row" id="imgList"></div>
                        </form>                          
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary btn-shenhe">审核</button>
                        <button type="button" class="btn btn-primary btn-delete">删除</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
        <!-- 修改/增加模态框（Modal） -->
        <div class="modal fade" id="myModal0" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title" id="myModalLabel">需求详情</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal" role="form">
                            <form class="form-horizontal" role="form" id="myModal1-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">企业名称</label>
                                    <div class="col-sm-10 input-group" style="float: left;padding-left: 15px;padding-right: 15px;">
                                      <input type="text" class="form-control" id="entName0" placeholder="请输入企业名称（必填）">
                                      <div class="input-group-btn">
                                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="sdropdown" style="height: 30px;">
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">主题</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入主题" id="topic0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">地址</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入地址" id="addr0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">描述</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" rows="3" placeholder="请输入描述" id="description0"></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">对接日期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请选择对接日期" id="meetDate0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">联系人</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入联系人" id="contact0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">职位</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入职位" id="position0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">联系方式</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入联系方式" id="mobile0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">创建日期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="createdate0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">审核日期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="updatedate0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">审核状态</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" readonly id="labelVerify0">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">选择图片1</label>
                                <div class="col-sm-10">
                                    <input type="file" class="form-control" id="imgInput1" accept="image/*">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">图片1简介</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入图片1简介" id="imgDes1">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">选择图片2</label>
                                <div class="col-sm-10">
                                    <input type="file" class="form-control" id="imgInput2" accept="image/*">
                                </div>
                            </div>
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">图片2简介</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请输入图片2简介" id="imgDes2">
                                </div>
                            </div>
                            <div class="row" id="imgList0">

                            </div>
                        </form>                          
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary btn-edit">修改</button>
						<button type="button" class="btn btn-primary btn-add">增加</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
        <!--导入-->
		<div class="modal fade " tabindex="-2" role="dialog" id="myModal3">
			<div class="modal-dialog modal-lg" role="document" style="margin-top: 10%;">
				<div class="modal-content">
					<div class="modal-header">	
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title"><i class="fa fa-pencil"></i> EXCEL导入</h4>
					</div>
					<div class="modal-body">
						<!--错误信息展示-->
						<div class="msg-wrap hidden">
							<div class="msg-error col-sm-8 col-sm-offset-3"><b></b><span id="msg_txt"></span></div>
						</div>

						<form class="form-horizontal" role="form" style="width: 500px;margin: 50px auto;">
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-10" style="text-align: right;">
								  <a class="btn btn-primary" href="/files/news-template.xlsx" download="导入模板.xlsx">模板下载</a>
								</div>
							  </div>
							<div class="form-group">
							  <label for="file" class="col-sm-2 control-label">选择文件</label>
							  <div class="col-sm-10">
								<input type="file" class="form-control" id="excel-file" name="file" placeholder="请选择要导入excel文件" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
							  </div>
							</div>
			
							<div class="form-group">
							  <div class="col-sm-offset-2 col-sm-10">
								<button type="button" class="btn btn-primary excel-import">导入</button>
							  </div>
							</div>
						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">关闭</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal-dialog -->
        </div>
        <div class="modal fade" id="loadingModal" backdrop="static" keyboard="false">
            　　
            <div style="width: 300px;height:100px; z-index: 20000; position: absolute; text-align: center; left: 50%; top: 50%;margin-left:-100px;margin-top:-10px">
                　　　　
                <div class="progress progress-striped active"
                    style="margin-bottom: 0;height:50px; text-align:center;line-height: 50px;font-size:14px;">
                    数据导入中,请稍候......　　　　
                </div>
                　　
            </div>
        </div>
		<script type="text/javascript">
		    var pageNo = 1
            var pageSize = 12
            var listData = []
            var nowIndex = -1
            var timeoutId = 0
			$(document).ready(function(){
				if($.cookie('AuthorizationAdmin')===null || localStorage.getItem('adminName') === null) {
					showErr("您处于未登录状态，请先登录", '1000000');
					return
				}
				$('#user_span').text(localStorage.getItem('realname') )
				loadResult()
                $('#searchBtn').click(function(){
                    loadResult()
                })

                $('#importBtn').click(function(){
					$('#myModal3').modal('show')
                })
                
                // 导入操作
				$('.excel-import').click(function(){
                    var file = $('#excel-file')[0].files[0]
                    if (file.name.indexOf('.xlsx') == -1) {
                        showErr('只允许导入.xlsx文件')
                        return
                    }
                    if (file !== undefined) {
                        var formData = new FormData()
                        formData.append("file",file)
                        formData.append("lx","demand")
                        showLoading()
                        $.ajax({
                            url: service_url + '/a/zhiku/zkLinkInteraction/impFile2',
                            data: formData,
                            type: 'GET',
                            headers: {
                                "Authorization": $.cookie("Authorization")
                            },
                            xhrFields: {
                                withCredentials: true
                            },
                            crossDomain: true,
                            contentType: false, // 不设置内容类型  
                            dataType: 'text',
                            jsonpCallback:"success_jsonpCallback",  
                            processData: false, // 告诉jQuery不要去处理发送的数据
                            success: function(data) {
                                hideLoading()
                                if (data.indexOf('00') > -1) {
                                    top.alert("导入成功",'', function() {
                                        $('#excel-file').val('')
                                    },{type: 'success'});
                                } else {
                                    showErr('导入失败')
                                } 
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                hideLoading()
                                console.log(XMLHttpRequest, textStatus, errorThrown)
                            }
                        })
                    } else {
                        showErr("请先选择要上传的excel文件")
                    }
                })

                $('#meetDate').datetimepicker({ 
					language : 'zh-CN',
                    format: 'yyyy-mm-dd',   
                    weekStart: 1,
                    todayBtn:  1,
                    autoclose: 1,
                    todayHighlight: 1,
                    startView: 2,
                    minView: 2,
                    forceParse: 0 
				}).on('changeDate',function(e){  
		    
                });
                $('#createdate,#updatedate,#createdate0,#updatedate0').datetimepicker({ 
					language : 'zh-CN',
                    format: 'yyyy-mm-dd hh:ii:ss',   
                    weekStart: 1,
                    todayBtn:  1,
                    autoclose: 1,
                    todayHighlight: 1,
                    startView: 2,
                    forceParse: 0,
                    showMeridian: 1   
				}).on('changeDate',function(e){  
		    
                });
                $('#meetDate0').datetimepicker({ 
					language : 'zh-CN',
				    format: 'yyyy-mm-dd hh:ii:ss',      
                    weekStart: 1,
                    todayBtn:  1,
                    autoclose: 1,
                    todayHighlight: 1,
                    startView: 2,
                    forceParse: 0,
                    showMeridian: 1
				}).on('changeDate',function(e){  
		    
                });
                
                // 企业名称输入框输入时定期查询
                $("#entName0").off('keyup').on('keyup', function (event) {
                    var val = $(this).val()
                    if (val !== '') {
                        clearTimeout(timeoutId)
                        timeoutId = setTimeout(function () {
                            $.ajax({
                                url: service_url + '/a/zhiku/zkLinkInteraction/findByNameLike?token='+$.cookie('AuthorizationAdmin')+'&entName='+encodeURIComponent(val),
                                type: 'GET',
                                xhrFields: {
                                    withCredentials: true
                                },
                                crossDomain: true,
                                contentType: 'application/json',
                                dataType: 'jsonp',
                                jsonpCallback:"success_jsonpCallback",  
                                processData: false, // 告诉jQuery不要去处理发送的数据
                                success: function(data) {
                                    if (data.status == '00') {
                                        var items = JSON.parse(data.data)
                                        var suggestData = {
                                            value: []
                                        }
                                        for (var i=0;i<items.length;i++){
                                            if (items[i].entName) {
                                                suggestData.value.push({
                                                    world: items[i].entName
                                                })
                                            }
                                        }
                                        $("#entName0").bsSuggest("destroy");
                                        $("#entName0").bsSuggest({
                                            allowNoKeyword: false,
                                            data: suggestData
                                        })
                                        if (suggestData.value.length > 0) $('#sdropdown').click()
                                    } else {
                                        showErr(data.msg)
                                    }
                                },
                                error: function(XMLHttpRequest, textStatus, errorThrown) {
                                    console.log(XMLHttpRequest, textStatus, errorThrown)
                                }
                            })
                        }, 1000);
                    }
                });

                // 查看按钮
                $('#list').on('click', '.do-chakan', function(){
                    $('.btn-shenhe,.btn-delete').hide()
                    nowIndex = $(this).attr('add-index')
                    var id = listData[nowIndex].id
                    var entName = listData[nowIndex].entName
                    $('#entName').val(entName)
                    $('#topic').val(listData[nowIndex].topic || '')
                    $('#addr').val(listData[nowIndex].addr || '')
                    $('#description').val(listData[nowIndex].description || '')
                    if (listData[nowIndex].meetDate != undefined && listData[nowIndex].meetDate != '') {
                        $('#meetDate').val(dateFormat('YYYY-mm-dd', new Date(listData[nowIndex].meetDate)))
                    } else {
                        $('#meetDate').val('')
                    }
                    $('#contact').val(listData[nowIndex].contact || '')
                    $('#position').val(listData[nowIndex].position || '')
                    $('#mobile').val(listData[nowIndex].mobile || '')
                    $('#createdate').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].createdate)))
                    $('#updatedate').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].updatedate)))
                    var labelVerifyStr = '未审核'
					if (listData[nowIndex].labelVerify == 0) labelVerifyStr = '未提交'
					if (listData[nowIndex].labelVerify == 1) labelVerifyStr = '已审核'
                    $('#labelVerify').val(labelVerifyStr)
                    var tempHtml = ''
                    $('#imgList').empty()
                    var pictureMessages = listData[nowIndex].zkPictureMessageList || []
                    for (var i = 0; i <  pictureMessages.length; i++) {
                        var imgDescription = pictureMessages[i].description || ''
                        tempHtml = tempHtml + '<div class="thumbnail"><img src="'+service_url + '/a/zhiku/zkLinkInteraction/getPic?id=' + pictureMessages[i].id+'" ><div class="caption"><p><b>图片描述:</b>'+imgDescription+'</p></div></div>'
                    }
                    $('#imgList').append(tempHtml)
                    $('#myModal').modal('show')
                    return
                    $.ajax({
                        url: service_url + '/a/zhiku/zkLinkInteraction/queryOneZkLinkAndPic/'+ id+'?token=' + $.cookie('AuthorizationAdmin'),
                        type: 'GET',
                        xhrFields: {
                            withCredentials: true
                        },
                        crossDomain: true,
                        contentType: 'application/json',
                        dataType: 'jsonp',
                        jsonpCallback:"success_jsonpCallback",  
                        processData: false, // 告诉jQuery不要去处理发送的数据
                        success: function(data) {
                            if (data.status === '00') {
                                var pictureMessages = JSON.parse(data.data).pictureMessages
                                var data = JSON.parse(data.data).interaction
                                $('#entName').val(entName)
                                $('#topic').val(data.topic || '')
                                $('#addr').val(data.addr || '')
                                $('#description').val(data.description || '')
                                if (data.meetDate != undefined || data.meetDate != '') {
                                    $('#meetDate').val(new Data(data.meetDate))
                                } else {
                                    $('#meetDate').val(new Data(''))
                                }
                                $('#contact').val(data.contact || '')
                                $('#position').val(data.position || '')
                                $('#mobile').val(data.mobile || '')
                                var labelVerifyStr = '未审核'
                                if (listData[nowIndex].labelVerify == 0) labelVerifyStr = '未提交'
                                if (listData[nowIndex].labelVerify == 1) labelVerifyStr = '已审核'
                                $('#labelVerify0').val(labelVerifyStr)

                                var tempHtml =  '<div class="form-group"><label  class="col-sm-2 control-label">企业名称</label><div class="col-sm-10"><input type="text" class="form-control" readonly value="'+entName+'"></div></div>'
                                if (data.topic !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label  class="col-sm-2 control-label">活动主题</label><div class="col-sm-10"><input type="text" class="form-control" id="topic" readonly value="'+data.topic+'"></div></div>'
                                }
                                if (data.type !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label for="type" class="col-sm-2 control-label">需求类型</label><div class="col-sm-10"><input type="text" class="form-control" id="type" readonly value="'+data.type+'"></div></div>'
                                }
                                if (data.addr !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label for="addr" class="col-sm-2 control-label">活动地址</label><div class="col-sm-10"><input type="text" class="form-control" id="addr" readonly value="'+data.addr+'"></div></div>'
                                }
                                if (data.contact !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label for="contact" class="col-sm-2 control-label">联系人</label><div class="col-sm-10"><input type="text" class="form-control" id="contact" readonly value="'+data.contact+'"></div></div>'
                                }
                                if (data.position !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label for="position" class="col-sm-2 control-label">职位</label><div class="col-sm-10"><input type="text" class="form-control" id="position" readonly value="'+data.position+'"></div></div>'
                                }
                                if (data.mobile !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label for="mobile" class="col-sm-2 control-label">联系方式</label><div class="col-sm-10"><input type="text" class="form-control" id="mobile" readonly value="'+data.mobile+'"></div></div>'
                                }
                                if (data.createDateStr !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label for="createDateStr" class="col-sm-2 control-label">创建时间</label><div class="col-sm-10"><input type="text" class="form-control" id="createDateStr" readonly value="'+data.createDateStr+'"></div></div>'
                                }
                                if (data.description !== undefined) {
                                    tempHtml = tempHtml + '<div class="form-group"><label for="description" class="col-sm-2 control-label">互动描述</label><div class="col-sm-10"><textarea class="form-control" rows="3" readonly id="description">'+data.description+'</textarea></div></div>'
                                }
                                if (data.labelVerify !== undefined) {
                                    var labelVerify =  data.labelVerify
                                    if (labelVerify === '-1') {
                                        labelVerify = '未审核'
                                    }
                                    if (labelVerify === '1') {
                                        labelVerify = '已审核'
                                    }
                                    tempHtml = tempHtml + '<div class="form-group"><label for="labelVerify" class="col-sm-2 control-label">审核状态</label><div class="col-sm-10"><input type="text" class="form-control" id="labelVerify" readonly value="'+labelVerify+'"></div></div>'
                                }
                                if (pictureMessages !== undefined && pictureMessages.length > 0) {
                                    tempHtml = tempHtml + '<div class="row">'
                                    for (var i = 0; i <  pictureMessages.length; i++) {
                                        var imgDescription = pictureMessages[i].description || ''
                                        tempHtml = tempHtml + '<div class="thumbnail"><img src="'+service_url + '/a/zhiku/zkLinkInteraction/getPic?id=' + pictureMessages[i].id+'" ><div class="caption"><p><b>图片描述:</b>'+imgDescription+'</p></div></div>'
                                    }
                                    tempHtml = tempHtml + '</div>'
                                }
                                $('#myModal1-body').append(tempHtml)
                                $('#myModal1').modal('show');
                            } else {
                                showErr("获取需求详情失败",)
                            }   
                        },
                        error: function(XMLHttpRequest, textStatus, errorThrown) {
                            console.log(XMLHttpRequest, textStatus, errorThrown)
                        }
                    })
                })
                // 审核按钮
				$('#list').on('click', '.do-shenhe', function(){
                    $('.btn-shenhe').show()
                    $('.btn-delete').hide()
                    nowIndex = $(this).attr('add-index')
                    var id = listData[nowIndex].id
                    var entName = listData[nowIndex].entName
                    $('#entName').val(entName)
                    $('#topic').val(listData[nowIndex].topic || '')
                    $('#addr').val(listData[nowIndex].addr || '')
                    $('#description').val(listData[nowIndex].description || '')
                    if (listData[nowIndex].meetDate != undefined && listData[nowIndex].meetDate != '') {
                        $('#meetDate').val(dateFormat('YYYY-mm-dd', new Date(listData[nowIndex].meetDate)))
                    } else {
                        $('#meetDate').val('')
                    }
                    $('#contact').val(listData[nowIndex].contact || '')
                    $('#position').val(listData[nowIndex].position || '')
                    $('#mobile').val(listData[nowIndex].mobile || '')
                    $('#createdate').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].createdate)))
                    $('#updatedate').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].updatedate)))
                    var labelVerifyStr = '未审核'
					if (listData[nowIndex].labelVerify == 0) labelVerifyStr = '未提交'
					if (listData[nowIndex].labelVerify == 1) labelVerifyStr = '已审核'
                    $('#labelVerify').val(labelVerifyStr)
                    var tempHtml = ''
                    var pictureMessages = listData[nowIndex].zkPictureMessageList || []
                    $('#imgList').empty()
                    for (var i = 0; i <  pictureMessages.length; i++) {
                        var imgDescription = pictureMessages[i].description || ''
                        tempHtml = tempHtml + '<div class="thumbnail"><img src="'+service_url + '/a/zhiku/zkLinkInteraction/getPic?id=' + pictureMessages[i].id+'" ><div class="caption"><p><b>图片描述:</b>'+imgDescription+'</p></div></div>'
                    }
                    $('#imgList').append(tempHtml)
                    $('#myModal').modal('show')
                })
                // 删除按钮
				$('#list').on('click', '.do-delete', function(){
                    $('.btn-delete').show()
                    $('.btn-shenhe').hide()
                    nowIndex = $(this).attr('add-index')
                    var id = listData[nowIndex].id
                    var entName = listData[nowIndex].entName
                    $('#entName').val(entName)
                    $('#topic').val(listData[nowIndex].topic || '')
                    $('#addr').val(listData[nowIndex].addr || '')
                    $('#description').val(listData[nowIndex].description || '')
                    if (listData[nowIndex].meetDate != undefined && listData[nowIndex].meetDate != '') {
                        $('#meetDate').val(dateFormat('YYYY-mm-dd', new Date(listData[nowIndex].meetDate)))
                    } else {
                        $('#meetDate').val('')
                    }
                    $('#contact').val(listData[nowIndex].contact || '')
                    $('#position').val(listData[nowIndex].position || '')
                    $('#mobile').val(listData[nowIndex].mobile || '')
                    $('#createdate').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].createdate)))
                    $('#updatedate').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].updatedate)))
                    var labelVerifyStr = '未审核'
					if (listData[nowIndex].labelVerify == 0) labelVerifyStr = '未提交'
					if (listData[nowIndex].labelVerify == 1) labelVerifyStr = '已审核'
                    $('#labelVerify').val(labelVerifyStr)
                    var tempHtml = ''
                    var pictureMessages = listData[nowIndex].zkPictureMessageList || []
                    $('#imgList').empty()
                    for (var i = 0; i <  pictureMessages.length; i++) {
                        var imgDescription = pictureMessages[i].description || ''
                        tempHtml = tempHtml + '<div class="thumbnail"><img src="'+service_url + '/a/zhiku/zkLinkInteraction/getPic?id=' + pictureMessages[i].id+'" ><div class="caption"><p><b>图片描述:</b>'+imgDescription+'</p></div></div>'
                    }
                    $('#imgList').append(tempHtml)
                    $('#myModal').modal('show')
                })
                // 修改按钮
				$('#list').on('click', '.do-edit', function(){
                    $('#labelVerify0').parent().parent().show()
                    $('#createdate0').parent().parent().show()
                    $('#updatedate0').parent().parent().show()
                    // $('#imgInput1,#imgInput2').parent().parent().hide()
                    // $('#imgDes1').parent().parent().hide()
                    // $('#imgDes2').parent().parent().hide()
                    $('#imgInput1,#imgInput2,#imgDes1,#imgDes2').val('')
                    $('.btn-edit').show()
					$('.btn-add').hide()
                    nowIndex = $(this).attr('add-index')
                    var id = listData[nowIndex].id
                    var entName = listData[nowIndex].entName
                    $('#entName0').val(entName)
                    $('#topic0').val(listData[nowIndex].topic || '')
                    $('#addr0').val(listData[nowIndex].addr || '')
                    $('#description0').val(listData[nowIndex].description || '')
                    $('#contact0').val(listData[nowIndex].contact || '')
                    $('#position0').val(listData[nowIndex].position || '')
                    $('#mobile0').val(listData[nowIndex].mobile || '')
                    $('#createdate0').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].createdate)))
                    $('#updatedate0').val(dateFormat('YYYY-mm-dd HH:MM:SS', new Date(listData[nowIndex].updatedate)))
                    if (listData[nowIndex].createdate === listData[nowIndex].updatedate) {
                        $('#updatedate0').parent().parent().hide()
                    } else {
                        $('#updatedate0').parent().parent().show()
                    }
                    var labelVerifyStr = '未审核'
					if (listData[nowIndex].labelVerify == 0) labelVerifyStr = '未提交'
					if (listData[nowIndex].labelVerify == 1) labelVerifyStr = '已审核'
                    $('#labelVerify0').val(labelVerifyStr)
                    var tempHtml = ''
                    var pictureMessages = listData[nowIndex].zkPictureMessageList || []
                    $('#imgList0').empty()
                    for (var i = 0; i <  pictureMessages.length; i++) {
                        var imgDescription = pictureMessages[i].description || ''
                        tempHtml = tempHtml + '<div class="thumbnail"><img src="'+service_url + '/a/zhiku/zkLinkInteraction/getPic?id=' + pictureMessages[i].id+'" ><div class="caption"><p><b>图片描述:</b>'+imgDescription+'</p><button type="button" class="btn imgDelete" add-data="'+pictureMessages[i].id+'">删除</button></div></div>'
                    }
                    $('#imgList0').append(tempHtml)
                    $('#myModal0').modal('show')
                })
                // 修改弹窗删除图片事件
                $('#imgList0').on('click', '.imgDelete', function(){
                    var id = $(this).attr('add-data')
                    var that = this
                    $.ajax({
                                url: service_url + '/a/zhiku/pic/delPic?id='+ id+'&token=' + $.cookie('AuthorizationAdmin'),
                                type: 'GET',
                                xhrFields: {
                                    withCredentials: true
                                },
                                crossDomain: true,
                                contentType: 'application/json',
                                dataType: 'jsonp',
                                jsonpCallback:"success_jsonpCallback",  
                                processData: false, // 告诉jQuery不要去处理发送的数据
                                success: function(data) {
                                    if (data.status === '00') {
                                        top.alert("删除成功",'','',{type: 'success'});
                                        $(that).parent().parent().remove()
                                        loadResult()
                                    } else {
                                        showErr("删除失败")
                                    } 
                                },
                                error: function(XMLHttpRequest, textStatus, errorThrown) {
                                    console.log(XMLHttpRequest, textStatus, errorThrown)
                                }
                            })
                })
                // 增加按钮
				$('#do-add').click(function() {
                    $('#labelVerify0').parent().parent().hide()
                    $('#createdate0').parent().parent().hide()
                    $('#updatedate0').parent().parent().hide()
                    $('#imgInput1,#imgInput2').parent().parent().show()
                    $('#imgDes1').parent().parent().show()
                    $('#imgDes2').parent().parent().show()
                    $('#imgList0').empty()
                    $('.btn-edit').hide()
                    $('.btn-add').show()
                    // 初始化表单值
                    $('#entName0').val('')
                    $('#topic0').val('')
                    $('#addr0').val('')
                    $('#description0').val('')
                    $('#meetDate0').val('')
                    $('#contact0').val('')
                    $('#position0').val('')
                    $('#mobile0').val('')
                    $('#imgInput1,#imgInput2').val('')
                    $('#imgDes1').val('')
                    $('#imgDes2').val('')
                    $('#myModal0').modal('show')
                })
                
                // 弹窗内审核按钮
				$('.btn-shenhe').click(function(){
                    var id = listData[nowIndex].id
                    $.ajax({
                                url: service_url + '/a/zhiku/zkLinkInteraction/verify?' + 'id='+ id+'&token=' + $.cookie('AuthorizationAdmin'),
                                type: 'GET',
                                xhrFields: {
                                    withCredentials: true
                                },
                                crossDomain: true,
                                contentType: 'application/json',
                                dataType: 'jsonp',
                                jsonpCallback:"success_jsonpCallback",  
                                processData: false, // 告诉jQuery不要去处理发送的数据
                                success: function(data) {
                                    if (data.status === '00') {
                                        $('#myModal').modal('hide')
                                        loadResult()
                                        top.alert("审核成功",'','',{type: 'success'});
                                    } else {
                                        showErr("审核失败")
                                    } 
                                },
                                error: function(XMLHttpRequest, textStatus, errorThrown) {
                                    showErr("审核失败")
                                    console.log(XMLHttpRequest, textStatus, errorThrown)
                                }
                            })
                })
                // 弹窗内删除按钮
				$('.btn-delete').click(function(){
                    var id = listData[nowIndex].id
                    $.ajax({
                        url: service_url + '/a/zhiku/zkLinkInteraction/logicDelete?token=' + $.cookie('AuthorizationAdmin')+'&id='+id,
                        type: 'GET',
                        xhrFields: {
                            withCredentials: true
                        },
                        crossDomain: true,
                        contentType: 'application/json',
                        dataType: 'jsonp',
                        jsonpCallback:"success_jsonpCallback",  
                        processData: false, // 告诉jQuery不要去处理发送的数据
                        success: function(data) {
                            if (data.status === '00') {
                                $('#myModal').modal('hide')
                                loadResult()
                                top.alert("删除成功",'','',{type: 'success'})
                            } else {
                                showErr(data.msg)
                            } 
                        },
                        error: function(XMLHttpRequest, textStatus, errorThrown) {
                            console.log(XMLHttpRequest, textStatus, errorThrown)
                        }
                    })
                })
                // 弹窗内修改按钮
                $('.btn-edit').click(function(){
                    var id = listData[nowIndex].id
                    var topic = $('#topic0').val()
                    var addr = $('#addr0').val()
                    var description = $('#description0').val()
                    var meetDate = $('#meetDate0').val()
                    var contact = $('#contact0').val()
                    var position = $('#position0').val()
                    var mobile = $('#mobile0').val()

                    var paramStr = 'id='+id+'&topic='+encodeURIComponent(topic)+'&addr='+encodeURIComponent(addr)+'&description=' + encodeURIComponent(description) + '&meetDate=' + encodeURIComponent(meetDate) +'&contact='+encodeURIComponent(contact) +'&position='+encodeURIComponent(position) +'&mobile='+encodeURIComponent(mobile)+ '&token=' + $.cookie('AuthorizationAdmin')
                    $.ajax({
                            url: service_url + '/a/zhiku/zkLinkInteraction/updateOneZkLinkAndPic?' + paramStr,
                            type: 'GET',
                            xhrFields: {
                                withCredentials: true
                            },
                            crossDomain: true,
                            contentType: 'application/json',
                            dataType: 'jsonp',
                            jsonpCallback:"success_jsonpCallback",  
                            processData: false, // 告诉jQuery不要去处理发送的数据
                            success: function(data) {
                                console.log(data.status)
                                if (data.status === '00') {
                                    // 增加新增图片
                                    var file1 = $('#imgInput1')[0].files[0]
                                    if (file1 !== undefined) {
                                        var formData = new FormData()
                                        var imgDes1 = $('#imgDes1').val()
                                        formData.append("description",imgDes1)
                                        formData.append("linkInteractionId",id)
                                        formData.append("file",file1)
                                        $.ajax({
                                            url: service_url + '/a/zhiku/pic/savePic',
                                            data: formData,
                                            type: 'GET',
                                            headers: {
                                                "Authorization": $.cookie("AuthorizationAdmin")
                                            },
                                            xhrFields: {
                                                withCredentials: true
                                            },
                                            crossDomain: true,
                                            contentType: false, // 不设置内容类型  
                                            dataType: 'text',
                                            jsonpCallback:"success_jsonpCallback",  
                                            processData: false, // 告诉jQuery不要去处理发送的数据
                                            success: function(data) {
                                                var file2 = $('#imgInput2')[0].files[0]
                                                if (file2 !== undefined) {
                                                    var formData = new FormData()
                                                    var imgDes2 = $('#imgDes2').val()
                                                    formData.append("description",imgDes2)
                                                    formData.append("linkInteractionId",id)
                                                    formData.append("file",file2)
                                                    $.ajax({
                                                        url: service_url + '/a/zhiku/pic/savePic',
                                                        data: formData,
                                                        type: 'GET',
                                                        headers: {
                                                            "Authorization": $.cookie("AuthorizationAdmin")
                                                        },
                                                        xhrFields: {
                                                            withCredentials: true
                                                        },
                                                        crossDomain: true,
                                                        contentType: false, // 不设置内容类型  
                                                        dataType: 'text',
                                                        jsonpCallback:"success_jsonpCallback",  
                                                        processData: false, // 告诉jQuery不要去处理发送的数据
                                                        success: function(data) {
                                                            loadResult()
                                                        },
                                                        error: function(XMLHttpRequest, textStatus, errorThrown) {
                                                            console.log(XMLHttpRequest, textStatus, errorThrown)
                                                        }
                                                    })
                                                } else {
                                                    loadResult()
                                                }
                                            },
                                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                                console.log(XMLHttpRequest, textStatus, errorThrown)
                                            }
                                        })
                                    } else {
                                        var file2 = $('#imgInput2')[0].files[0]
                                        if (file2 !== undefined) {
                                            var formData = new FormData()
                                            var imgDes2 = $('#imgDes2').val()
                                            formData.append("description",imgDes2)
                                            formData.append("linkInteractionId",id)
                                            formData.append("file",file2)
                                            $.ajax({
                                                url: service_url + '/a/zhiku/pic/savePic',
                                                data: formData,
                                                type: 'GET',
                                                headers: {
                                                    "Authorization": $.cookie("AuthorizationAdmin")
                                                },
                                                xhrFields: {
                                                    withCredentials: true
                                                },
                                                crossDomain: true,
                                                contentType: false, // 不设置内容类型  
                                                dataType: 'text',
                                                jsonpCallback:"success_jsonpCallback",  
                                                processData: false, // 告诉jQuery不要去处理发送的数据
                                                success: function(data) {
                                                    loadResult()
                                                },
                                                error: function(XMLHttpRequest, textStatus, errorThrown) {
                                                    console.log(XMLHttpRequest, textStatus, errorThrown)
                                                }
                                            })
                                        } else {
                                            loadResult()
                                        }
                                    }

                                    top.alert("修改成功",'','',{type: 'success'})
                                    $('#myModal0').modal('hide')
                                } else {
                                    showErr(data.msg)
                                }   
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                console.log(XMLHttpRequest, textStatus, errorThrown)
                            }
                        })
                    
                })
                // 弹窗内增加按钮
				$('.btn-add').click(function(){
                    var entName = $('#entName0').val()
                    var topic = $('#topic0').val()
                    var addr = $('#addr0').val()
                    var description = $('#description0').val()
                    var meetDate = $('#meetDate0').val()
                    var contact = $('#contact0').val()
                    var position = $('#position0').val()
                    var mobile = $('#mobile0').val()
                    var imgDes1 = $('#imgDes1').val()
                    var imgDes2 = $('#imgDes2').val()
                    if (entName == '') {
                        showErr('企业名称不能为空！')
                        return
                    }
                    var formData = new FormData()
                    formData.append("type",1)
                    formData.append("entName",entName)
                    formData.append("topic",topic)
                    formData.append("addr",addr)
                    formData.append("description",description)
                    formData.append("meetDate",meetDate)
                    formData.append("contact",contact)
                    formData.append("position",position)
                    formData.append("mobile",mobile)
                    formData.append("zkPictureMessageList[0].description",imgDes1)
                    formData.append("zkPictureMessageList[1].description",imgDes2)
                    var files = $('#imgInput')[0].files
                    if (files.length > 0) {
                        for (var i = 0; i < files.length; i++) {
                            if (i < 2) {
                                formData.append("files",files[i])
                            }
                        }
                    }
                    $.ajax({
                            url: service_url + '/a/zhiku/zkLinkInteraction/save',
                            data: formData,
                            type: 'GET',
                            headers: {
                                "Authorization": $.cookie("AuthorizationAdmin")
                            },
                            xhrFields: {
                                withCredentials: true
                            },
                            crossDomain: true,
                            contentType: false, // 不设置内容类型  
                            dataType: 'text',
                            jsonpCallback:"success_jsonpCallback",  
                            processData: false, // 告诉jQuery不要去处理发送的数据
                            success: function(data) {
                                if (data.indexOf('00') > -1) {
                                    top.alert('增加成功!','','',{type: 'success'})
                                    $('#myModal0').modal('hide')
                                    loadResult()
                                } else {
                                    showErr('增加失败！')
                                }
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                console.log(XMLHttpRequest, textStatus, errorThrown)
                            }
                        })
                })
            })
            // 根据条件查询
            function loadResult() {
                $('#list').empty()
                $('.pagination-box').hide()
                var labelVerify = $('#dataType').val()
                var paramStr = 'entName='+ encodeURIComponent($('#sentName').val()) + '&'
                if (labelVerify == 0) {
                    paramStr = paramStr + 'labelVerify=3&pageNo='+pageNo+'&pageSize='+pageSize+'&token=' + $.cookie('AuthorizationAdmin')
                    // paramStr = 'pageNo='+pageNo+'&pageSize='+pageSize+'&token=' + $.cookie('AuthorizationAdmin')
                } else {
                    paramStr = paramStr + 'labelVerify='+labelVerify+'&pageNo='+pageNo+'&pageSize='+pageSize+'&token=' + $.cookie('AuthorizationAdmin')
                }
                $.ajax({
                    // url: service_url + '/a/zhiku/zkLinkInteraction/findList?'+paramStr,
                    url: service_url + '/a/zhiku/zkLinkInteraction/colist?'+paramStr,
                    type: 'GET',
                    xhrFields: {
                        withCredentials: true
                    },
                    crossDomain: true,
                    contentType: 'application/json',
                    dataType: 'jsonp',
                    jsonpCallback:"success_jsonpCallback",  
                    processData: false, // 告诉jQuery不要去处理发送的数据
                    success: function(data) {
                        
                        var data = JSON.parse(data.data)
                        var list = data.list
                        listData = list
                        if (data.count === 0) {
                            $('#list').append('<tr><td colspan="6" style="text-align:center">暂无数据</td></tr>')
                        } else {
                            var tempHtml = ''
                            for (var i = 0; i < list.length; i++) {
                                var description = list[i].description
                                if (description.length > 26) description = description.slice(0,23) + '...'
                                var statusHtml = ''
								var doHtml = ''
								if (list[i].labelVerify == -1) {
									statusHtml = '<span class="examine-no">未审核</span>'
									doHtml = '<span class="do-chakan" add-index="'+i+'">查看</span><span class="do-shenhe" add-index="'+i+'">审核</span><span class="do-edit" add-index="'+i+'">修改</span><span class="do-delete" add-index="'+i+'">删除</span>'
								} else if (list[i].labelVerify == 1) {
									statusHtml = '<span class="examine-yes">已审核</span>'
									doHtml = '<span class="do-chakan" add-index="'+i+'">查看</span><span class="do-edit" add-index="'+i+'">修改</span><span class="do-delete" add-index="'+i+'">删除</span>'
								} else if (list[i].labelVerify == 0) {
                                    statusHtml = '未提交'
								}

                                tempHtml = tempHtml + '<tr><td>'+((pageNo-1)*pageSize+i+1)+'</td><td>'+list[i].entName+'</td><td>'+description+'</td><td>'+statusHtml+'</td><td>'+doHtml+'</td></tr>'
                            }
                            $('#list').append(tempHtml)
                            $('.pagination-box').show()
                            $('.pagination').jqPaginator({
                                totalCounts: data.count,
                                pageSize: pageSize,
                                visiblePages: 10,
                                currentPage: pageNo,
                                first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
                                prev: '<li class="prev"><a href="javascript:void(0);">&laquo;<\/a><\/li>',
                                next: '<li class="next"><a href="javascript:void(0);">&raquo;<\/a><\/li>',
                                last: '<li class="last"><a href="javascript:void(0);">末页<\/a><\/li>',
                                page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
                                onPageChange: function (num, type) {
                                    if (type === 'change') {
                                        pageNo = num
                                        loadResult()
                                    }
                                }
                            });
                        }
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        console.log(XMLHttpRequest, textStatus, errorThrown)
                    }
                })
            }
            function showLoading (){
				$('#loadingModal').modal({backdrop: 'static', keyboard: false});
			}

			function hideLoading(){
				$('#loadingModal').modal('hide');
			}
		</script>
	</body>

</html>